package com.ruoyi.huanghefd.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 工作票模板-主表工作设备
 *
 * @TableName worksheet_template
 */
@TableName(value = "worksheet_template")
@Data
public class WorksheetTemplate implements Serializable {
    /**
     * ID
     */
    private String id;

    /**
     * 工作票类型
     */
    private String wsType;

    /**
     * 工作票名称
     */
    private String wsTypeName;

    /**
     * 设备（系统）编码
     */
    private String deviceCode;

    /**
     * 设备（系统）名称
     */
    private String deviceName;
    /**
     * 发起人id
     */
    private String sponsorId;
    /**
     * 发起人
     */
    private String sponsor;
    /**
     * 接收人id
     */
    private String receiverId;
    /**
     * 接收人
     */
    private String receiver;
    /**
     * 审核人id
     */
    private String approverId1;
    /**
     * 审核人
     */
    private String approver1;
    /**
     * 审核人id
     */
    private String approverId2;
    /**
     * 审核人
     */
    private String approver2;
    /**
     * 班组部门id
     */
    private String deptId;
    /**
     * 班组部门
     */
    private String dept;
    /**
     * 状态
     */
    private String state;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createtime;
    /**
     * 当前环节
     */
    private String typicalStep;
    /**
     * 工作票模板 工作内容
     */
    private List<WorksheetTemplateCxt> cxt;
    /**
     * 工作票模板 安全措施1
     */
    private List<WorksheetTemplateMeasures1> safetyMeasures1;
    /**
     * 工作票模板 安全措施2
     */
    private List<WorksheetTemplateMeasures2> safetyMeasures2;
    /**
     * 工作票模板 安全措施3
     */
    private List<WorksheetTemplateMeasures3> safetyMeasures3;
    /**
     * 工作票模板 安全措施4
     */
    private List<WorksheetTemplateMeasures4> safetyMeasures4;
    /**
     * 工作票模板 安全措施5
     */
    private List<WorksheetTemplateMeasures5> safetyMeasures5;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WorksheetTemplate other = (WorksheetTemplate) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getWsType() == null ? other.getWsType() == null : this.getWsType().equals(other.getWsType()))
                && (this.getWsTypeName() == null ? other.getWsTypeName() == null : this.getWsTypeName().equals(other.getWsTypeName()))
                && (this.getDeviceCode() == null ? other.getDeviceCode() == null : this.getDeviceCode().equals(other.getDeviceCode()))
                && (this.getDeviceName() == null ? other.getDeviceName() == null : this.getDeviceName().equals(other.getDeviceName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getWsType() == null) ? 0 : getWsType().hashCode());
        result = prime * result + ((getWsTypeName() == null) ? 0 : getWsTypeName().hashCode());
        result = prime * result + ((getDeviceCode() == null) ? 0 : getDeviceCode().hashCode());
        result = prime * result + ((getDeviceName() == null) ? 0 : getDeviceName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", wsType=").append(wsType);
        sb.append(", wsTypeName=").append(wsTypeName);
        sb.append(", deviceCode=").append(deviceCode);
        sb.append(", deviceName=").append(deviceName);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}